package cn.iocoder.yudao.module.iot.controller.admin.operationhistory.vo;

import cn.iocoder.yudao.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

@Schema(description = "管理后台 - 操作历史记录分页 Request VO")
@Data
public class OperationHistoryPageReqVO extends PageParam {

    @Schema(description = "操作代码")
    private String operationCode;

    @Schema(description = "操作名称", example = "李四")
    private String operationName;

    @Schema(description = "操作描述", example = "你猜")
    private String operationDescription;

    @Schema(description = "HTTP方法")
    private String httpMethod;

    @Schema(description = "API端点")
    private String endpoint;

    @Schema(description = "请求参数")
    private String parameters;

    @Schema(description = "请求体")
    private String requestBody;

    @Schema(description = "响应状态码", example = "1")
    private Integer responseStatus;

    @Schema(description = "响应体")
    private String responseBody;

    @Schema(description = "操作用户ID", example = "24058")
    private Long userId;

    @Schema(description = "操作用户名", example = "赵六")
    private String userName;

    @Schema(description = "IP地址")
    private String ipAddress;

    @Schema(description = "用户代理")
    private String userAgent;

    @Schema(description = "执行时间(毫秒)")
    private Long executionTimeMs;

    @Schema(description = "执行状态: SUCCESS, FAILED", example = "2")
    private String status;

    @Schema(description = "错误信息")
    private String errorMessage;

    @Schema(description = "创建时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] createTime;

}